package com.android.vgongyi.mapper;

import android.text.TextUtils;

import com.android.vgongyi.common.AppApiPreference;

public class CommonRequest  extends BaseRequest{

	
	/**
	 * mini blog item's id
	 * */
	private String itemId;
	
	public CommonRequest(String itemId) {
		this.itemId   = itemId;
	}
	

	
	public String executeToREST() {
		StringBuffer buffer = new StringBuffer();
		if(TextUtils.isEmpty(itemId)){

			//buffer.append(super.CommonHeader);
			//FIXME  -  use online parameter @clouse_LJQ 
			buffer.append(AppApiPreference.LATEST_BLOG_URL);
			
		}else{
			
			//FIXME  -  use online parameter @clouse_LJQ 
			buffer.append(String.format(AppApiPreference.LOAD_STATUS_URL, itemId));
			
			//old codes
			//buffer.append(super.CommonHeader);
			//buffer.append("index.php").append(AppConstant.CHARACTER_QUESTION);
			//buffer.append("from_id").append(AppConstant.CHARACTER_EQUAL).append(itemId);

		}	
		
		
		
		return buffer.toString();
	}
	
	
	
	
	
	
	
}
